/*
GeorgeLib
Collider.h
Under MIT License
*/

#ifndef __COLLIDER_H__
#define __COLLIDER_H__

#include "stdafx.h"
#include "Node.h"

namespace GeorgeLib
{
	/// The base class for Colliders
	class DLLEXPORT Collider : public Node
	{
	public:
		/// Constructor
		Collider(void);
		/// Constructor : copy from an existing Collider
		Collider(const Collider &col);
		/// Destructor
		~Collider(void);

		/// Enabled Colliders will collide with other colliders, disable Colliders won't
		bool enabled;

		/// Check if a Collider is within the bounds of this Collider
		/// @param collider The other Collider to check containment with
		virtual bool Contains(Collider& collider) = 0;
		/// Check if a point in space is within the bounds of this Collider
		/// @param point The point to check containment with
		virtual bool Contains(vec3 point) = 0;
		/// Makes sure a Collider is within the constrains of the bounds of this Collider
		/// @param collider The other Collider to contain
		virtual void Contain(Collider &collider) = 0;
		/// @param point The point to contain
		virtual void Contain(vec3 &point) = 0;

		/// Check if a Collider is intersecting with this Collider
		/// @param collider The other Collider to check containment with
		virtual bool Collides(const Collider& collider) = 0;
	};
}

#endif // __COLLIDER_H__